<html><head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>DrawVectorText</title></head>
<body bgcolor="#EFF1F0" link="#3A3966" vlink="#000000" alink="#000000">
<font face="Verdana, sans-serif" size="2"><p align="center"><b><font size="4">DrawVectorText()</font></b></p>
<p><b>语法</b></p><blockquote>
<font color="#3A3966"><b>DrawVectorText</b></font>(Text$)</blockquote>

</blockquote>
<b>概要</b><br><blockquote>



Draw the given text at the current location of the <a href="movepathcursor.html">path cursor</a>. 
The cursor will be moved horizontally to the end of the drawn text. The font to use 
can be set with <a href="vectorfont.html">VectorFont()</a>. 

 

</blockquote><p><b>参数</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>Text$</i></td>
<td width="90%"> 
 
The text to draw (single line). 

 

</td></tr>
</table>
</blockquote><p><b>返回值</b></p><blockquote>
无.


</blockquote><p><b>备注</b></p><blockquote>



This function draws single lines of text only. Multiple calls must be made 
to draw multiple lines. Use <a href="vectortextwidth.html">VectorTextWidth()</a> and <a href="vectortextheight.html">VectorTextHeight()</a> to determine 
the dimensions of the text to draw in order to properly align the text with other content. 
<br>
<br>
The <a href="drawvectorparagraph.html">DrawVectorParagraph()</a> function can be used to draw a larger block of text with automatic 
layout such as line breaks. This function is more suited for drawing multiline text. 

 

</blockquote><p><b>示例</b></p><blockquote>


<pre><font face="Courier New, Courier, mono"size="2">  <b><font color="#3A3966">If</font></b> <font color="#3A3966">OpenWindow</font>(0, 0, 0, 400, 200, "VectorDrawing", <font color="#924B72">#PB_Window_SystemMenu</font> | <font color="#924B72">#PB_Window_ScreenCentered</font>)
<font color="#3A3966">    CanvasGadget</font>(0, 0, 0, 400, 200)
<font color="#3A3966">    LoadFont</font>(0, "Impact", 20, <font color="#924B72">#PB_Font_Bold</font>)
    
    <b><font color="#3A3966">If</font></b> <font color="#3A3966">StartVectorDrawing</font>(<font color="#3A3966">CanvasVectorOutput</font>(0))
    
<font color="#3A3966">      VectorFont</font>(<font color="#3A3966">FontID</font>(0), 25)
<font color="#3A3966">      VectorSourceColor</font>(<font color="#3A3966">RGBA</font>(0, 0, 0, 80))
      Text$ = "The quick brown fox jumped over the lazy doc"
      
      <b><font color="#3A3966">For</font></b> i = 1 <b><font color="#3A3966">To</font></b> 6
<font color="#3A3966">        MovePathCursor</font>(200 -<font color="#3A3966"> VectorTextWidth</font>(Text$)/2, 100 -<font color="#3A3966"> VectorTextHeight</font>(Text$)/2)
<font color="#3A3966">        DrawVectorText</font>(Text$)
<font color="#3A3966">        RotateCoordinates</font>(200, 100, 30)
      <b><font color="#3A3966">Next</font></b> i

<font color="#3A3966">      StopVectorDrawing</font>()
    <b><font color="#3A3966">EndIf</font></b>
    
    <b><font color="#3A3966">Repeat</font></b>
      Event =<font color="#3A3966"> WaitWindowEvent</font>()
    <b><font color="#3A3966">Until</font></b> Event = <font color="#924B72">#PB_Event_CloseWindow</font>
  <b><font color="#3A3966">EndIf</font></b>
</font></pre>

<p><img src="../HelpPictures/drawvectortext.png"></p>

</blockquote><p><b>参阅</b></p><blockquote>

<a href="vectortextwidth.html">VectorTextWidth()</a>, <a href="vectortextheight.html">VectorTextHeight()</a>, <a href="drawvectorparagraph.html">DrawVectorParagraph()</a>, <a href="addpathtext.html">AddPathText()</a>, <a href="vectorfont.html">VectorFont()</a> 

</Blockquote><p><b>已支持操作系统 </b><Blockquote>所有</Blockquote></p><center>&lt;- <a href=drawvectorparagraph.html>DrawVectorParagraph()</a> - <a href="index.html">VectorDrawing Index</a> - <a href="endvectorlayer.html">EndVectorLayer()</a> -&gt;<br><br>


</body></html>